//
//  HttpUtil.h
//  NewsReader
//
//  Created by blacksun on 10-10-18.
//  Copyright 2010 __MyCompanyName__. All rights reserved.
//

#import <Foundation/Foundation.h>
#import "SqlUtil.h"
#import "URLAddress.h"
#import <SystemConfiguration/SystemConfiguration.h>


#define kRequestTimeOut 30

@interface HttpUtil : NSObject {
	NSObject * myTarget;
	SEL mySelector;
	NSMutableData *responseData;
	BOOL isBackground;
	NSURLConnection *currentConnection;
	BOOL localWiFiRef;
    SCNetworkReachabilityRef reachabilityRef;
	BOOL isConnectioning;
}

@property (nonatomic, retain) NSURLConnection *currentConnection;
//+(BOOL) isBaseUrlGFW;
+(BOOL) isNetworkUseable;
+ (void)showUsageAlertDialog;
-(NSURLConnection *) performRequest:(NSURLRequest *)aRequest withTarget:(id)aTarget andCallBackAction:(SEL)aSelector isBackGround:(BOOL)isBackGround;
-(void)loadNewFeedsWithSectionId:(NSString *)sectionId maxid:(NSInteger)maxid object:(id)target andSelector:(SEL ) selector;
-(void)stopHttpConnection;
@end
